package com.asset.dispoal.user.service.converter;

import com.asset.dispoal.user.domain.db.entity.BsLawyerDo;
import com.asset.dispoal.user.domain.db.entity.SysUserDo;
import com.asset.dispoal.user.domain.redis.entity.UserRedis;
import com.asset.dispoal.user.dto.BsLawyerAddRequest;
import com.asset.dispoal.user.dto.BsLawyerRequest;
import com.asset.dispoal.user.dto.BsLawyerResponse;
import com.asset.dispoal.user.dto.UserRequest;
import com.asset.dispoal.user.dto.UserResponse;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author qr
 * @date 2022/1/24$
 */
@Mapper
public interface UserConverter {

    UserConverter INSTANCE = Mappers.getMapper(UserConverter.class);

    UserResponse doToRes(UserRedis redis);

    SysUserDo reqToDo(UserRequest request);


    List<UserResponse> doToRes(List<SysUserDo> doList);

    BsLawyerDo reqToDo(BsLawyerRequest bsLawyerRequest);

    BsLawyerResponse resDoTo(BsLawyerDo bsLawyerDo);


    BsLawyerDo reqAddToDo(BsLawyerAddRequest bsLawyerRequest);
}
